home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998…tember: Reference Library / Dev.CD Sep 98 RL2.toast / What's New / Software Development Kits / MacOS USB DDK / Tools / USBDDKBuildAll next >
Encoding:
Text File  |  1998-07-20  |  2.5 KB  |  103 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        USBDDKBuildProject
  3. #
  4. #    Contains:    Build Script for USBDDK
  5. #
  6. #    Version:    xxx put version here xxx
  7. #
  8. #
  9.  
  10. set Commands `Directory`Tools:,"{Commands}"
  11. export Commands
  12.  
  13. unset BuildTargets
  14.  
  15. set DebugBuild 0
  16. export DebugBuild
  17.  
  18. Set t7 `Date -n`
  19. Set t8 "`Date -s`"
  20.  
  21. Open "{Worksheet}"
  22.  
  23. Echo "#******************************************************************************************************"
  24. if "{1}" == 'clean'
  25.     Echo "# Clean & Build DDK drivers & examples"
  26.     Echo "#   Deleting all files in "{USBDDKObjects}
  27.     echo "Test" >"{USBDDKObjects}Test"
  28.     delete -i -y "{USBDDKObjects}"≈
  29.     
  30.     Echo "#   Deleting all files in "{USBDDKReleaseExtensions}
  31.     echo "Test" >"{USBDDKReleaseExtensions}Test"
  32.     delete -i -y "{USBDDKReleaseExtensions}"≈
  33. else
  34.     if "{1}" == 'full'
  35.         Echo "# Full build all USB drivers"
  36.     else
  37.         Echo "# Build all USB drivers"
  38.     end
  39. end
  40.     
  41. if `Exists "{USBDDKTargets}Drivers:"`
  42.     Echo "#   …Targets:Drivers folder still exists (no need to create it)"
  43. else
  44.     NewFolder "{USBDDKTargets}Drivers"
  45. end
  46.  
  47. if `Exists "{USBDDKTargets}Utilities:"`
  48.     Echo "#   …Targets:Utilities folder still exists (no need to create it)"
  49. else
  50.     NewFolder "{USBDDKTargets}Utilities"
  51. end
  52.  
  53. if `Exists "{USBDDKTargets}Maps:"`
  54.     Echo "#   …Targets:Maps folder still exists (no need to create it)"
  55. else
  56.     NewFolder "{USBDDKTargets}Maps"
  57. end
  58.  
  59.  
  60. if `Exists "{USBDDKFolder}Drivers"`
  61.     For i In `Files -af -f -d "{USBDDKFolder}Drivers"`                    # For all directories within the  Drivers folder....
  62.         (Evaluate "{i}" =~ /≈':'≈':'(≈)®1':'/) ∑ dev:null                # Get the name of the folder, put in ®1
  63.         Directory "{i}" 
  64.         set -e USBDDKDriverPath "{i}" 
  65.         set -e USBDDKDriver {®1}
  66.         set exit 0
  67.         execute USBDDKBuildDriver {1}
  68.     End
  69. End
  70.  
  71. if `Exists "{USBDDKFolder}Examples"`
  72.     For i In `Files -af -f -d "{USBDDKFolder}Examples"`                    # For all directories within the  Drivers folder....
  73.         (Evaluate "{i}" =~ /≈':'≈':'(≈)®1':'/) ∑ dev:null                # Get the name of the folder, put in ®1
  74.         Directory "{i}" 
  75.         set -e USBDDKDriverPath "{i}"
  76.         set -e USBDDKDriver {®1}
  77.         set exit 0
  78.         execute USBDDKBuildDriver {1}
  79.     End
  80. End
  81.  
  82.  
  83. directory "{USBDDKFolder}"
  84.  
  85. Set t2 `Date -n`
  86. Set t3 "`Date -s`"
  87.  
  88. echo "#   Started: "{t0}
  89. echo "# Completed: "{t3}
  90. echo "#"
  91.  
  92. Set t `Evaluate {t2} - {t7}`
  93. if "{1}" == 'clean'
  94.     Echo "# Time required to Clean & Build all of the drivers: {t} seconds."
  95. else
  96.     if "{1}" == 'full'
  97.         Echo "# Time required to do a full build all of the drivers: {t} seconds."
  98.     else
  99.         Echo "# Time required to do a build all of the drivers: {t} seconds."
  100.     end
  101. end
  102. Echo "#******************************************************************************************************"
  103.